#include <stdio.h>
#include <stdint.h>
#include <stdbool.h>

// Rust函数的外部声明
extern uint64_t get_num_size();
extern void* create_first_num(uint64_t num);
extern void put_num(uint64_t num1, uint64_t num2, void* vec);
extern void remove_num(uint64_t num1, uint64_t num2, void* vec);
extern bool check_num(uint64_t num1, uint64_t num2, const void* vec);
extern uint64_t get_size(uint64_t num1, const void* vec);

int main() {
    // 调用Rust函数
    uint64_t num = 10;
    void* vec = create_first_num(num);

    uint64_t num1 = 2;
    uint64_t num2 = 3;

    put_num(num1, num2, vec);

    bool result = check_num(num1, num2, vec);
    if (result) {
        printf("Element at (%lu, %lu) is true\n", num1, num2);
    } else {
        printf("Element at (%lu, %lu) is false\n", num1, num2);
    }

    uint64_t vec_size = get_size(num1, vec);
    printf("Size of Vec at index %lu: %lu\n", num1, vec_size);

    remove_num(num1, num2, vec);

    result = check_num(num1, num2, vec);
    if (result) {
        printf("Element at (%lu, %lu) is true\n", num1, num2);
    } else {
        printf("Element at (%lu, %lu) is false\n", num1, num2);
    }

    return 0;
}